home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / MacHacksBug / Python 1.5.2c1 / Mac / IDE scripts / Widget demos / TwoLists.py < prev    next >
Encoding:
Text File  |  2000-06-23  |  621 b   |  23 lines

  1. import W
  2.  
  3. def twothird(width, height):
  4.     return (8, 8, width - 8, 2*height/3 - 4)
  5.  
  6. def onethird(width, height):
  7.     return (8, 2*height/3 + 4, width - 8, height - 22)
  8.  
  9. def halfbounds1(width, height):
  10.     return (0, 0, width/2 - 4, height)
  11.  
  12. def halfbounds2(width, height):
  13.     return (width/2 + 4, 0, width, height)
  14.  
  15. window = W.Window((400, 400), "Sizable window with two lists", minsize = (200, 200))
  16.  
  17. window.listgroup = W.Group(twothird)
  18. window.listgroup.list1 = W.List(halfbounds1, range(13213, 13310))
  19. window.listgroup.list2 = W.List(halfbounds2, range(800, 830))
  20. window.et = W.EditText(onethird, "Wat nu weer?")
  21.  
  22. window.open()
  23.